package medium;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: 582895699@qq.com
 * @Desctription: 采购
 * @Date: Created in 2021/12/17 13:54
 */
@Slf4j
public class Purchase {

    public void byeComputer(int size) {
        Stock stock = new Stock();
        Sale sale = new Sale();
        int saleStatus = sale.getSaleStatus();
        if (saleStatus > 80) {
            log.info("采购{}台电脑", size);
            stock.increase(size);
        } else {
            int num = saleStatus / 2;
            log.info("折半采购{}台", num);
        }
    }

    public void refuseComputer() {
        log.info("不在采购电脑");

    }
}
